﻿@using INNOVACALL.Framework.Common
@using InnovaApp.Layers.ResourcesLayer.Properties
@{
    string StyleBundleBase = string.Empty;
    InnovaApp.Layers.CommonLayer.Models.ViewModels.LayoutViewModels._LayoutViewModels_Base layoutModel =
        (InnovaApp.Layers.CommonLayer.Models.ViewModels.LayoutViewModels._LayoutViewModels_Base)Model;
    string JQueryUITheme = System.Configuration.ConfigurationManager.AppSettings["JQueryUITheme"];
    bool CustomTheme = JQueryUITheme.ToLower() != "base";
    if (CustomTheme)
    {
        StyleBundleBase = string.Format(@"~/Content/themes/{0}", JQueryUITheme);
    }
}
<!DOCTYPE html>
<html lang="en" class="siteBackground">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    @foreach (var item in layoutModel._Meta)
    { 
        <meta name="@item.Key.ToString()" content="@item.Value" />
    }
    <title>@layoutModel._PageTitle</title>
    <link href="@Url.Content("~/CSSG/Site.css")" rel="stylesheet" type="text/css" />
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <!--Bundle Manager-->
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryui")
    @if(layoutModel._UsesKendoUI){
        @Scripts.Render("~/bundles/kendoui")
    }
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/views")


    @Styles.Render("~/Content/themes/css")
    @if (CustomTheme)
    { 
        @Styles.Render(string.Format(@"{0}/css", StyleBundleBase))
    }
    @if (layoutModel._UsesKendoUI) 
    {
        @Styles.Render("~/Content/clientComponents/KendoUI/css")
    }    
    <!--/Bundle Manager-->
    @if (layoutModel._SpecificCSS != null)
    {
        foreach (var cssReference in layoutModel._SpecificCSS)
        { 
        <link href="@Url.Content("~/Content/" + cssReference)" rel="stylesheet" type="text/css" />
        }
    }
    @if (layoutModel._externalCss != null)
    {
        foreach (var cssReference in layoutModel._externalCss)
        { 
        <link href="@cssReference" rel="stylesheet" type="text/css" />
        }
    }
    @if (layoutModel._externalJs != null)
    {
        foreach (var jsReference in layoutModel._externalJs)
        { 
            <script src="@Url.Content(jsReference)" type="text/javascript"></script>
        }
    }
    @foreach (var jsReference in layoutModel._SpecificJS)
    { 
        <script src="@Url.Content("~/Scripts/" + jsReference)" type="text/javascript"></script>
    }
</head>
<body>
    <div id="divMceRibbonBarPlaceholder">
        <span class="mceEditor defaultSkin">
            <table class="mceLayout">
            </table>
        </span>
    </div>
    <div class="divRssLink">
        <a href="/rss.xml" title="@Resources.View_All_RssIconBalloon">
            <img src="/Images/RSS.png" alt="RSS" />
        </a>
    </div>
    @Html.Hidden("hidOpeningMessage", layoutModel._PageMessage, new { @Id = "hidOpeningMessage" })
    <div class="content-wrapper full-height page shadow">
        <div class="float-left">
            <section id="LanguageSelector">
                @Html.Partial("_LanguageSelector", layoutModel._Languages)
            </section>
        </div>
        <div class="float-right">
            <section id="login">
                @Html.Partial("_LoginPartial", layoutModel._Languages.SelectedLanguage)
            </section>
        </div>
        <div class="divMenuContainer">
            @if (layoutModel._DisplayMenus)
            { 
                <nav>
                    <div id="divMenuBar">
                        @Html.Partial("_MenuBar", layoutModel._Menus)
                    </div>
                    <div class="layoutMenuCache">
                    </div>
                </nav>
            }
        </div>
        <div id="divBody">
            @RenderBody()
        </div>
        <div class="pusher">
        </div>
    </div>
    <!--KendoUI Add-->
    <style scoped>
        #customValue
        {
            line-height: 16px;
            width: 60px;
            float: none;
            margin: -3px 0 0 5px;
        }
    </style>
    <!--/KendoUI Add-->
    <div id="dialogMessage">
    </div>
    <div id="dialogForm">
    </div>
    <div id="inlinePopup" class="notDisplayed">
        <iframe id="ifrInlinePopup" frameborder="0" scrolling="no"></iframe>
    </div>
    @if (IsSectionDefined("StructurePageEditor"))
    {
        <div class="divStructurePageEditor notDisplayed">
            @RenderSection("StructurePageEditor")
        </div> 
    }
    <div class="footer">
        <div class="LogoMyPrettyCMS">
            <a href="http://www.innovacall.com" target="_blank">
                <img src="/Images/LogoInnovacallMyPrettyCMS.png" alt="Done with Innovacall My Pretty CMS" />
            </a>
        </div>
    </div>
</body>
@if (layoutModel._SpecificJqueryJS != null)
{
    foreach (var specificJqueryJSReference in layoutModel._SpecificJqueryJS)
    {
        string prefix = string.Empty;
        if (!specificJqueryJSReference.StartsWith("http"))
        {
            prefix = "~/Scripts/";
        }
    <script src="@Url.Content(prefix + specificJqueryJSReference)" type="text/javascript"></script>
    }
}
@if (layoutModel._DynamicJqueryJS != null)
{
    foreach (var dynamicJqueryJS in layoutModel._DynamicJqueryJS)
    { 
    <script src="@Url.Content("~" + dynamicJqueryJS)" type="text/javascript"></script>
    }
}
@Html.Raw(@"<script type=""text/javascript"">")
@{
    foreach (string variable in layoutModel._JSVariables)
    {
	@Html.Raw(variable);
    }
}
@Html.Raw(@"$(document).ready(function () {")
@Html.Raw(@"	$.fn.DocReady();")
@Html.Raw(@"});")
@Html.Raw(@"</script>")
</html>
